The present invention relates generally to semiconductor microprocessors and microcontrollers, and more particularly to such devices having on-chip program memory.
In microcontroller or microprocessor devices having on-chip or on-board program memory, it is necessary during the execution of certain programs to switch from the on-chip memory, which may be ROM, EPROM, EEPROM or other program memory, to off-chip program memory, and vice versa. The conventional technique for accomplishing this system configuration is to use a pin on the semiconductor device package, such as a 40-pin or a 68-pin package, to which a "1" or a "0" is written depending on whether the execution is to be from internal or external memory. This pin is customarily referred to in the industry as MC/MP (short for MicroController orMicroProcessor mode), or EA (for External Access).
The prior art technique may be explained by reference to the block diagram of FIG. 1. A microcontroller 10 addresses the data bus 12, latches data sent to a specific address via a latch 15, and brings a bit back on the MC/MP pin. A program executing from internal memory is required to write a "0" to switch to execution from external memory, and a program executing from external memory is required to write a "1" to switch to execution from internal memory. A latch is necessary because the effect must be delayed until the next instruction begins execution. The need for an additional pin to accommodate MC/MP is wasteful in that there is generally a desire to conserve pin outs of the package for various essential purposes.
Accordingly, it is a principal object of the present invention to provide improvements in techniques for switching between internal and external memory in semiconductor microcontrollers and microprocessors.
Another important object of the invention is to provide a semiconductor device requiring program execution from on-chip memory and off-chip memory, in which simplified switching between the two memories is employed for such purpose.